#pragma once

#define DEFAULT_WINDOW_NAME "Lighting"
#define DEFAULT_WINDOW_WIDTH 800
#define DEFAULT_WINDOW_HEIGHT 600
#define DEFAULT_FPS 30

#define DEFAULT_FOG_COLOR 0xC0C0C0
#define DEFAULT_FOG_RANGE_START 10.0
#define DEFAULT_FOG_RANGE_END 30.0

#define ENABLE_LIGHTING true
#define ENABLE_FOG false
#define DIE_ON_NO_CAMERA
//#define DO_NOT_DRAW_UNDER

#include "Str.h"

class GameController
{
private:
    Str title;
    int width;
    int height;
	int fps,frame,baseTime,baseTimeFull,fpsReadout;
    
    void initLighting();
	void calcFPS();
	void fpsTimer(int blank);
public:
    GameController();
    ~GameController();
    
    Str& getTitle();
    int getWidth();
    GameController& setWidth(int width);
    GameController& sysSetWidth(int width);
    int getHeight();
    GameController& setHeight(int height);
    GameController& sysSetHeight(int height);
	double getWindowRatio();
    void init();
    bool isLightingEnabled();
	int getFPS();
	GameController& setFPS(int fps);
	void __sysFPS();
	
	//FOG//
	void initFog();
	GameController& enableFog();
	GameController& disableFog();
	bool isFogEnabled();
	GameController& setFogColor(int color);
	GameController& setFogRange(double start, double end);
	GameController& setFogModeLinear();
	GameController& setFogModeExp();
	GameController& setFogModeExp2();
	GameController& setFogDensity(double density);
};

extern GameController gameController;